home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / blipxtab.cpp < prev    next >
C/C++ Source or Header  |  1994-10-10  |  2KB  |  80 lines

  1. #include "blipxtab.h"
  2. #include "stdicons.h"
  3.  
  4. BlockIPXTable::BlockIPXTable(rect coordinates,
  5.            char* tabName,
  6.            char* fName,
  7.            char* h,
  8.            int s,
  9.            BORDERS b_type,
  10.            BORDERS hdr_b_type,
  11.            int res,
  12.            int hdr_pat,
  13.            int elem_pat,
  14.            int fNo,
  15.            char** fields,
  16.            char** types)
  17.     : BlockPXTable(coordinates, tabName, fName, h, s, b_type,
  18.            hdr_b_type, res, hdr_pat, elem_pat, fNo, fields, types)
  19.     {
  20.     int xl = coordinates.origin.X + 1;
  21.     int yt = coordinates.corner.Y - 2;
  22.  
  23.     f_first_button = new Icon(loc(xl + 13, yt), ICON_FIND_FIRST, SMALL_ICON,
  24.     BUTTON_BORDER);
  25.     f_next_button = new Icon(loc(xl + 17, yt), ICON_FIND_NEXT,
  26.     SMALL_ICON, BUTTON_BORDER);
  27.     rotate_button = new Icon(loc(xl + 21, yt), ICON_ROTATE, SMALL_ICON,
  28.     BUTTON_BORDER);
  29.     edit_button = new Icon(loc(xl + 25, yt), ICON_EDIT, SMALL_ICON,
  30.     BUTTON_BORDER);
  31.  
  32.     add(f_first_button);
  33.     add(f_next_button);
  34.     add(rotate_button);
  35.     add(edit_button);
  36.  
  37.     assign(table, f_first_button, AC_FIND_FIRST);
  38.     assign(table, f_next_button, AC_FIND_NEXT);
  39.     assign(table, rotate_button, AC_NEXT);
  40.     assign(table, edit_button, AC_EDIT);
  41.     }
  42. /////////////////////////////////
  43. void BlockIPXTable::rearrange()
  44.     {
  45.     BlockPXTable::rearrange();
  46.     rect r;
  47.     rect coord = textRect(r = w1->bound());
  48.  
  49.     int xl = r.origin.X + 1;
  50.     int yt = r.corner.Y - 2;
  51.  
  52.     f_first_button->repose(rect(xl + 13, yt, xl + 16, yt));
  53.     f_next_button->repose(rect(xl + 17, yt, xl + 24, yt));
  54.     rotate_button->repose(rect(xl + 21, yt, xl + 31, yt));
  55.     edit_button->repose(rect(xl + 25, yt, xl + 31, yt));
  56.     }
  57. /////////////////////////
  58. /*
  59. void main()
  60.     {
  61.     if(!init_KNOW_HOW())
  62.     return;
  63.     if(PXInit() != PXSUCCESS)
  64.     return;
  65.  
  66.     setfillstyle(SOLID_FILL, pColorSet->colors.BAK_COLOR);
  67.     bar(0, 0, getmaxx(), getmaxy());
  68.  
  69.     BlockIPXTable w(rect(10, 2, 78, 18), "demo.db", "window.pcy",
  70.     " KNOW-HOW 4.x", 3, SHOW_BORDER, SHOW_BORDER, MOVE | RESIZE, 19, 0);
  71.  
  72.     w.show_window();
  73.     w.exe();
  74.     w.hide();
  75.  
  76.     PXExit();
  77.     close_KNOW_HOW();
  78.     closegraph();
  79.     }
  80. */